class WLUserDataTypeView:UIView {
- (void)updateAllButtonStatus {
    NSInteger unselectedCount = 0; 
    NSInteger selectedCount = 0;
    for (WLUserDataTypeModel *first in self.dataTypeArray) {
        if (!first.isSelected) {
            unselectedCount++;
        } else {
            selectedCount++;
            for (WLUserDataTypeModel *second in first.childList) {
                if (!second.isSelected) {
                    unselectedCount++;
                } else {
                    selectedCount++;
                }
            }
        }
    }
    if (unselectedCount == 0) {
        self.allButton.selected = YES;
        self.isSelected = YES;
    } else {
        self.allButton.selected = NO;
        if (selectedCount == 0) {
            self.isSelected = NO;
        } else {
            self.isSelected = YES;
        }
    }
}
}